package net.youpoint.dao;

import java.util.List;

import net.youpoint.entity.QuestionEntity;

import com.google.appengine.api.datastore.Key;

/**
 * question data access object
 * 
 * @author public
 * 
 */
public interface QuestionDao {

	/**
	 * list all questions
	 * 
	 * @return questions list
	 */
	public List<QuestionEntity> listAll();

	/**
	 * list questions without deleted ones
	 * 
	 * @return questions list
	 */
	public List<QuestionEntity> list();

	/**
	 * find question entity by key
	 * 
	 * @param key
	 * 
	 * @return found question entity
	 */
	public QuestionEntity find(Key key);

	/**
	 * save question
	 * 
	 * @param question
	 */
	public void save(final QuestionEntity question);

	/**
	 * mark question as deleted (not real delete)
	 * 
	 * @param question
	 */
	public void markDeleted(final QuestionEntity question);

	/**
	 * delete question without ability to restore
	 * 
	 * @param question
	 */
	public void totalDelete(final QuestionEntity question);
}
